package io;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

/**
 * @User: vitobo
 * @Date: 2024-08-13
 * @Description: 字符流 读操作
 *
 */
public class IODemo8 {
    public static void main(String[] args) {
        try(Reader reader = new FileReader("f:/test.txt")){
            while (true){
                int ch = reader.read();
                if(ch == -1){
                    break;
                }
                System.out.println("" + (char)ch);
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
